import 'dart:convert';

import 'package:network_info_plus/network_info_plus.dart';
import 'package:sptapp/basic/base_info.dart';

class WifiTool {
   static NetworkInfo info = NetworkInfo();
   static Future<String> getWifiName() async {
     String? ip = await info.getWifiIP();
     print('wifi ip ==== $ip');

     String? name = await info.getWifiName();
     print('wifi name ==== $name');
     if(name != null){
       LocalBaseInfo.setWifiName(name.replaceAll('"', ""));
     }
     return name??'';
   }
}